package com.andox.fn.inf.rpc.rest.protocol.registry;

import java.util.List;

import com.andox.fn.inf.rpc.rest.common.LifeCycle;
import com.andox.fn.inf.rpc.rest.config.ReferenceConfig;
import com.andox.fn.inf.rpc.rest.config.ServiceConfig;
import com.andox.fn.inf.rpc.rest.extension.SPI;
import com.andox.fn.inf.rpc.rest.protocol.registry.RegistryService.RegistryNotify;


/**   
 * @ClassName:   RegistryImpl   
 * @Description: registry impl interface, for zookeeper, consul... 
 * @author:      Andox
 * @date:        2019年8月16日 上午11:23:34   
 *     
 */
@SPI("zookeeper")
public interface RegistryImpl extends LifeCycle{
	void setConnection(String connection);
	
	void register(ServiceConfig registerData);
	void unregister(ServiceConfig registerData);
	
	List<ReferenceConfig> subscribe(ReferenceConfig registerData, RegistryNotify rn);
	
	void unsubscribe(ReferenceConfig registerDate);
	// ...
}
